package shell
{
	import flash.system.ApplicationDomain;
	
	import org.robotlegs.core.IInjector;
	import org.robotlegs.utilities.modular.mvcs.StarlingModuleSignalContext;
	
	import shell.bootstraps.controller.BootstrapStartCommand;
	import shell.bootstraps.controller.setups.BootstrapModules;
	import shell.signals.StartUpSignal;
	
	import starling.display.DisplayObjectContainer;
	
	public class ShellContext extends StarlingModuleSignalContext
	{
		public function ShellContext(contextView:DisplayObjectContainer=null, autoStartup:Boolean=true, parentInjector:IInjector=null, applicationDomain:ApplicationDomain=null)
		{
			super(contextView, autoStartup, parentInjector, applicationDomain);
		}
		
		override public function startup():void
		{
			// 初始化模块
			new BootstrapModules(viewMap);
			
			var startUp:StartUpSignal = new StartUpSignal();
			// common module start up
			moduleSignalCommandMap.mapSignal(startUp, BootstrapStartCommand, true);
			////////////////////////////////////
			startUp.dispatch();
			
//			super.startup();
		}
	}
}